<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/common/common-taglib.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
<%@ include file="/WEB-INF/views/common/common-meta.jsp"%>
<title>任务编辑-教学材料管理系统</title>
<%@ include file="/WEB-INF/views/common/common-css.jsp"%>
</head>
<body>
	<!-- header -->
	<%@ include file="/WEB-INF/views/common/header.jsp"%>

	<!-- 主管理区域 admin-main -->
	<div class="am-cf admin-main higher">
		<!-- 侧边栏 side bar start -->
		<div class="admin-sidebar">
			<%@ include file="/WEB-INF/views/sidebar/sidebar.jsp"%>
		</div>
		<!-- side bar end -->

		<!-- 内容区域 content start -->
		<div class="admin-content" id="admin-content">
			<div class="am-cf am-padding">
				<div class="am-fl am-cf">
					<strong class="am-text-primary am-text-lg">教学任务管理</strong> / <small><a
						href="task.action">教学任务</a></small> / <small>任务编辑</small>
				</div>
			</div>
			<div class="am-tabs am-margin">
				<ul class="am-tabs-nav am-nav am-nav-tabs">
					<li class="am-active"><a href="javascript:;">教学任务信息</a></li>
				</ul>

				<div class="am-tabs-bd">
					<div class="am-tab-panel am-fade am-in am-active" id="job-tag">
						<form class="am-form" id="taskForm"
							action="task/updateTaskSubmit.action" method="post">
							<div class="am-u-sm-1 am-text-left">
								<strong>教学任务</strong>
							</div>
							<br>
							<hr>
							<div class="am-g am-margin-top">
								<div class="am-u-sm-2 am-text-right">*年份</div>
								<div class="am-u-sm-4 am-text-left">
									<select data-am-selected="{btnSize: 'sm'}" class="am-input-sm"
										id="taskYear" name="taskYear" required="required">
										<option value="">请选择</option>
										<c:forEach items="${yearList}" var="year">
											<option value="${year}"
												<c:if test="${task.taskYear==year}">selected="selected"</c:if>>${year}</option>
										</c:forEach>
									</select>
								</div>
								<div class="am-u-sm-6 am-text-right"></div>
							</div>

							<div class="am-g am-margin-top">
								<div class="am-u-sm-2 am-text-right">*学期</div>
								<div class="am-u-sm-4 am-text-left">
									<input type="radio" name="taskTerm" value="1"
										<c:if test="${task.taskTerm==1}">checked="checked"</c:if>>第一学期<br>
									<input type="radio" name="taskTerm" value="2"
										<c:if test="${task.taskTerm==2}">checked="checked"</c:if>>第二学期
								</div>
								<div class="am-u-sm-6 am-text-right"></div>
							</div>

							<div class="am-g am-margin-top">
								<div class="am-u-sm-2 am-text-right">*班级</div>
								<div class="am-u-sm-4 am-text-left">
									<select data-am-selected="{btnSize: 'sm'}" class="am-input-sm"
										id="classId" name="classId" required="required">
										<option value="">请选择</option>
										<c:forEach items="${clazzList}" var="clazz">
											<option value="${clazz.classId}"
												<c:if test="${task.classId==clazz.classId}">selected="selected"</c:if>>${clazz.className}</option>
										</c:forEach>
									</select>
								</div>
								<div class="am-u-sm-6 am-text-right"></div>
							</div>

							<div class="am-g am-margin-top">
								<div class="am-u-sm-2 am-text-right">*课程名称</div>
								<div class="am-u-sm-4 am-text-left">
									<select data-am-selected="{btnSize: 'sm'}" class="am-input-sm"
										id="courseId" name="courseId" required="required">
										<option value="">请选择</option>
										<c:forEach items="${courseList}" var="course">
											<option value="${course.courseID}"
												<c:if test="${task.courseId==course.courseID}">selected="selected"</c:if>>${course.courseName}</option>
										</c:forEach>
									</select>
								</div>
								<div class="am-u-sm-6 am-text-right"></div>
							</div>

							<div class="am-g am-margin-top">
								<div class="am-u-sm-2 am-text-right">课时安排</div>
								<div class="am-u-sm-6 am-text-left">
									<c:forEach items="${weekList}" var="week" varStatus="status">
										<input type="checkbox" class="am-checkbox-inline" name="weeks"
											value="${week}"
											<t:exist items="${weeks}" value="${week}">checked="checked"</t:exist>>${week}
										<c:if test="${(status.index+1)%5==0}">
											<br>
										</c:if>
									</c:forEach>
								</div>
								<div class="am-u-sm-4 am-text-left"></div>
							</div>

							<div class="am-g am-margin-top">
								<div class="am-u-sm-2 am-text-right">任务备注</div>
								<div class="am-u-sm-4">
									<textarea rows="3" maxlength="500"
										data-am-popover="{content:'50-500字之间',trigger:'hover focus'}"
										id="remark" name="remark">${task.remark}</textarea>
								</div>
								<div class="am-u-sm-4"></div>
							</div>

							<input type="hidden" value="${task.taskId}" name="taskId">
							<br>

						</form>
					</div>
				</div>
			</div>

			<div class="am-margin">
				<div class="am-u-sm-1 am-text-right">
					<t:pril action="task/updateTaskSubmit">
						<button type="button" class="am-btn am-btn-primary am-btn-xs"
							onclick="updateTask()" id="subBtn">提交</button>
					</t:pril>
				</div>
			</div>
		</div>
		<!-- content end -->
	</div>

	<!-- footer -->
	<%@ include file="/WEB-INF/views/common/footer.jsp"%>
	<!-- 控制js -->
	<%@ include file="/WEB-INF/views/common/common-js.jsp"%>

	<script src="assets/script/task/task-update.js"></script>
</body>
</html>

